package com.weishu.finace.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.weishu.common.core.web.domain.AjaxResult;
import com.weishu.core.entity.CwCheckBatch;
import com.weishu.core.service.ICwCheckBatchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/checkBath")
public class CheckBathController {

    @Autowired
    private ICwCheckBatchService iCwCheckBatchService;

    @RequestMapping("/getList")
    public AjaxResult getList(CwCheckBatch cwCheckBatch, @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "8") Integer pageSize){
        //分页信息
        PageHelper.startPage(pageNum,pageSize);
        PageInfo<CwCheckBatch> pageInfo = iCwCheckBatchService.queryList(cwCheckBatch);
        return AjaxResult.success(pageInfo);
    }
}
